package cn.jzk.aitest.Controller;

import cn.jzk.aitest.Service.ChatHistoryService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 历史会话管理
 * @author jiangzk
 * 2025/4/22  下午4:43
 */
@RestController
@RequestMapping("/ai/history")
public class ChatHistoryController {

    @Resource
    private ChatHistoryService chatHistoryService;


    /**
     * 获取历史会话列表信息（这里的 type 可根据需求进行更改）
     */
    @RequestMapping("/{type}")
    public List<String> getChatIds(@PathVariable("type") String type) {
        return chatHistoryService.getChatIds(type);
    }
}
